﻿@model IEnumerable<Film8.Models.Director>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
@using (Ajax.BeginForm(
    new AjaxOptions
    {
        HttpMethod = "get",
        InsertionMode = InsertionMode.Replace,
        UpdateTargetId = "directorList"
    }
))
{
    <p>
        Find by name: @Html.TextBox("SearchString")
        Find by ID: @Html.TextBox("SearchStringID")
        Find by movie title: @Html.TextBox("searchStringMovieTitle")
        <input type="submit" value="Search" />
    </p>
}

@Html.Partial("_DirectorsTable", Model)
